package cn.wolfcode.feign;

import cn.wolfcode.common.web.Result;
import cn.wolfcode.domain.PayVo;
import cn.wolfcode.domain.RefundVo;
import cn.wolfcode.feign.fallback.AliPayFeignFallBack;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;

import java.util.Map;

@FeignClient(name = "pay-service",fallback = AliPayFeignFallBack.class)
public interface AliPayFeignApi {

    @RequestMapping("/alipay/payOnline")
    Result<String> payOnline(@RequestBody PayVo payVo);  // 将PayVo对象的数据传入,贴@RequestBody

    @RequestMapping("/alipay/verifySign")
    Result<Boolean> verifySign(@RequestBody Map<String, String> params);

    @RequestMapping("/alipay/refundOnline")
    Result<Boolean> refundOnline(@RequestBody RefundVo refundVo);
}
